{% if site.disqus_shortname %}
<div id="disqus_thread"></div>
<script>
    /**
     * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
     * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
     */

    var disqus_config = function() {
        this.page.url = '{{ site.url }}{{ page.url }}'; // Replace PAGE_URL with your page's canonical URL variable
        this.page.identifier = '{{ site.url }}{{ page.url }}'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
    };

    (function() { // DON'T EDIT BELOW THIS LINE
        var d = document,
            s = d.createElement('script');

        s.src = '//{{site.disqus_shortname}}.disqus.com/embed.js';

        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
    })();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}

{% if site.gitalk_shortname %}

<!-- Gitalk评论框 start -->
<!-- Link Gitalk 的支持文件  -->
        <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
        <script src="https://unpkg.com/gitalk@latest/dist/gitalk.min.js"></script> 
        <div id="gitalk-container"></div>
        <script type="text/javascript">
            var gitalk = new Gitalk({
            // gitalk的主要参数
                clientID: '6e04c01032c117e3c2db',
                clientSecret: '1b2b470871a9a9055646f223a82c1f901a9fc07d',
                repo: 'leozhao0202.github.io',
                owner: 'leozhao0202',
                admin: ['leozhao0202'],
                id:window.location.pathname,
            });

            gitalk.render('gitalk-container');
        </script> 
<!-- Gitalk end -->

{% endif %}